﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Glue;
using Xunit;

namespace GlueTests.AutoRelaterTests
{
    public class When_automatically_relating_between_nested_types_of_same_type
    {

        public class GuiPerson { public Address Address { get; set; } }
        public class DomainPerson { public Address Address { get; set; } }

        public class Address { public String City { get; set; } }

        private Mapping<DomainPerson, GuiPerson> mapping;

        public When_automatically_relating_between_nested_types_of_same_type()
        {
            mapping = new Mapping<DomainPerson, GuiPerson>();
            mapping.AutoRelateEqualNames();
        }

        [Fact]
        public void Should_not_include_it_if_no_mapping_is_present()
        {
            Assert.Equal(0,mapping.Relations.Count);
        }
    }
}
